package ca.jsbr.canvaswar.games.ui 
{
	import ca.jsbr.as2js_lib.display.animations.Tween;
	import ca.jsbr.as2js_lib.display.canvas.CanvasStage;
	import ca.jsbr.as2js_lib.display.canvas.Node2D;
	import ca.jsbr.canvaswar.games.unit.Unit;
	/**
	 * ...
	 * @author jsbr [jsricard@lvlstudio.com]
	 */
	public class Battle extends Node2D
	{
		private var _left:BattleBox;
		private var _right:BattleBox;
		
		public function Battle(unit1:Unit,unit2:Unit) 
		{
			_left = new BattleBox(unit1);
			_right = new BattleBox(unit2, true);
			addChild(_left);
			addChild(_right);
			Tween.to(_left, 1, { x:CanvasStage.instance.width * 0.5 - _left.width } );
			Tween.to(_right, 1, { x:CanvasStage.instance.width * 0.5} );
		}
		
	}

}